package interfaces.superWidgets;

import interfaces.GUISource;

import org.fenggui.Button;
import org.fenggui.binding.render.ImageFont;

public class InterfaceButton extends Button implements TextWidget {
	
	protected ImageFont buttonFont;
	
	public InterfaceButton(ImageFont buttonFont) {
		this("", buttonFont);
	}
	
	public InterfaceButton(String text, ImageFont buttonFont) {
		super(text);
		this.buttonFont = buttonFont;
		
		setUp();
		GUISource.setFont(this, buttonFont);
	}
	
	private void setUp() {
		GUISource.setTheme(this);
		getAppearance().setEnabled(STATE_HOVERED, false);
		getAppearance().setEnabled(STATE_PRESSED, false);
		getAppearance().setEnabled(STATE_DISABLED, false);
		getAppearance().setEnabled(STATE_FOCUSED, false);
	}
	
	@Override
	public ImageFont getFont() { return buttonFont; }
}